<!DOCTYPE html><html lang="zh-CN" data-theme="dark"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"><title>J.のblog</title><meta name="author" content="J."><meta name="copyright" content="J."><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#0d0d0d"><meta property="og:type" content="website">
<meta property="og:title" content="J.のblog">
<meta property="og:url" content="http://dycloudnavite.love/page/4/index.html">
<meta property="og:site_name" content="J.のblog">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="http://dycloudnavite.love/img/touxiang.png">
<meta property="article:author" content="J.">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="http://dycloudnavite.love/img/touxiang.png"><link rel="shortcut icon" href="/dujie5416/img/touxiang.png"><link rel="canonical" href="http://dycloudnavite.love/page/4/"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><link rel="stylesheet" href="/dujie5416/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox.min.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = { 
  root: '/dujie5416/',
  algolia: {"appId":"9GWB2VV7GN","apiKey":"dac56ec5b0b1f45281251ee59db4d637","indexName":"blog","hits":{"per_page":6},"languages":{"input_placeholder":"搜索文章","hits_empty":"找不到您查询的内容：${query}","hits_stats":"找到 ${hits} 条结果，用时 ${time} 毫秒"}},
  localSearch: undefined,
  translate: {"defaultEncoding":2,"translateDelay":0,"msgToTraditionalChinese":"繁","msgToSimplifiedChinese":"簡"},
  noticeOutdate: undefined,
  highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: '天',
  date_suffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: undefined,
  lightbox: 'fancybox',
  Snackbar: undefined,
  source: {
    justifiedGallery: {
      js: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery/dist/fjGallery.min.js',
      css: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery/dist/fjGallery.min.css'
    }
  },
  isPhotoFigcaption: false,
  islazyload: false,
  isAnchor: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
  title: 'J.のblog',
  isPost: false,
  isHome: true,
  isHighlightShrink: false,
  isToc: false,
  postUpdate: '2024-01-30 11:12:40'
}</script><noscript><style type="text/css">
  #nav {
    opacity: 1
  }
  .justified-gallery img {
    opacity: 1
  }

  #recent-posts time,
  #post-meta time {
    display: inline !important
  }
</style></noscript><script>(win=>{
    win.saveToLocal = {
      set: function setWithExpiry(key, value, ttl) {
        if (ttl === 0) return
        const now = new Date()
        const expiryDay = ttl * 86400000
        const item = {
          value: value,
          expiry: now.getTime() + expiryDay,
        }
        localStorage.setItem(key, JSON.stringify(item))
      },

      get: function getWithExpiry(key) {
        const itemStr = localStorage.getItem(key)

        if (!itemStr) {
          return undefined
        }
        const item = JSON.parse(itemStr)
        const now = new Date()

        if (now.getTime() > item.expiry) {
          localStorage.removeItem(key)
          return undefined
        }
        return item.value
      }
    }
  
    win.getScript = url => new Promise((resolve, reject) => {
      const script = document.createElement('script')
      script.src = url
      script.async = true
      script.onerror = reject
      script.onload = script.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        script.onload = script.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(script)
    })
  
      win.activateDarkMode = function () {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = function () {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
          if (t === 'dark') activateDarkMode()
          else if (t === 'light') activateLightMode()
        
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    
    const detectApple = () => {
      if(/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
        document.documentElement.classList.add('apple')
      }
    }
    detectApple()
    })(window)</script><link rel="stylesheet" href="/xxx.css"><link rel="stylesheet" href="/css/universe.css"><link rel="stylesheet" href="/css/custom.css"><style type="text/css">#toggle-sidebar {bottom: 80px}</style><link rel="stylesheet" href="https://fastly.jsdelivr.net/gh/tzy13755126023/BLOG_SOURCE/css/function.min.css"><link rel="stylesheet" href="/css/rightMenu.css"><style type="text/css">#toggle-sidebar {left:100px}</style><!-- hexo injector head_end start --><link rel="stylesheet" href="https://cdn.cbd.int/hexo-butterfly-clock-anzhiyu/lib/clock.min.css" /><!-- hexo injector head_end end --><meta name="generator" content="Hexo 6.2.0"><link rel="alternate" href="/dujie5416/atom.xml" title="J.のblog" type="application/atom+xml">
</head><body><div id="loading-box"><div class="loading-left-bg"></div><div class="loading-right-bg"></div><div class="spinner-box"><div class="configure-border-1"><div class="configure-core"></div></div><div class="configure-border-2"><div class="configure-core"></div></div><div class="loading-word">加载中...</div></div></div><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src="/dujie5416/img/touxiang.png" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="sidebar-site-data site-data is-center"><a href="/dujie5416/archives/"><div class="headline">文章</div><div class="length-num">73</div></a><a href="/dujie5416/tags/"><div class="headline">标签</div><div class="length-num">17</div></a><a href="/dujie5416/categories/"><div class="headline">分类</div><div class="length-num">11</div></a></div><hr/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/dujie5416/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/dujie5416/archives/"><i class="fa-fw fas fa-archive"></i><span> 归档</span></a></div><div class="menus_item"><a class="site-page" href="/dujie5416/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/dujie5416/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div></div></div></div><div class="page" id="body-wrap"><header class="full_page" id="page-header" style="background-image: url('/dujie5416/img/longzhu.png')"><nav id="nav"><span id="blog_name"><a id="site-name" href="/dujie5416/">J.のblog</a></span><div id="menus"><div id="search-button"><a class="site-page social-icon search"><i class="fas fa-search fa-fw"></i><span> 搜索</span></a></div><div class="menus_items"><div class="menus_item"><a class="site-page" href="/dujie5416/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/dujie5416/archives/"><i class="fa-fw fas fa-archive"></i><span> 归档</span></a></div><div class="menus_item"><a class="site-page" href="/dujie5416/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/dujie5416/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div></div><div id="toggle-menu"><a class="site-page"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="site-info"><h1 id="site-title">J.のblog</h1><div id="site-subtitle"><span id="subtitle"></span></div></div><div id="scroll-down"><i class="fas fa-angle-down scroll-down-effects"></i></div></header><main class="layout" id="content-inner"><div class="recent-posts" id="recent-posts"><div class="recent-post-item"><div class="post_cover left"><a href="/dujie5416/2023/02/12/Golang%E7%BA%BF%E6%80%A7%E8%A1%A8-%E6%95%B0%E7%BB%84%E3%80%81%E5%88%87%E7%89%87/" title="Golang线性表-数组、切片"><img class="post_bg" src="/dujie5416/img/golang.png" onerror="this.onerror=null;this.src='/dujie5416/img/404.jpg'" alt="Golang线性表-数组、切片"></a></div><div class="recent-post-info"><a class="article-title" href="/dujie5416/2023/02/12/Golang%E7%BA%BF%E6%80%A7%E8%A1%A8-%E6%95%B0%E7%BB%84%E3%80%81%E5%88%87%E7%89%87/" title="Golang线性表-数组、切片">Golang线性表-数组、切片</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-02-12T06:32:00.000Z" title="发表于 2023-02-12 14:32:00">2023-02-12</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/dujie5416/categories/golang/">golang</a></span></div><div class="content">线性表-数组、切片一、数据结构1、数值处理取整	// 整除
	fmt.Println(3/2, -1/2, -3/2)
	// 向上取整
	fmt.Println(math.Ceil(2.01), math.Ceil(2.5), math.Ceil(2.9))
	fmt.Println(math.Ceil(-2.01), math.Ceil(-2.5), math.Ceil(-2.9))
	// 向下取整
	fmt.Println(math.Floor(2.31), math.Floor(2.54), math.Floor(2.99))
	fmt.Println(math.Floor(-2.31), math.Floor(-2.54), math.Floor(-2.99))
	// 四舍五入
	fmt.Println(math.Round(3.44449), math.Round(3.9), math.Round(3.555))
	fmt.Println(math.Round(-3.44449), math.Round(-3.9), math.Round(-3.555))

// 输出 ...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/dujie5416/2023/01/13/%E3%80%90mysql%E6%95%B0%E6%8D%AE%E6%8D%9F%E5%9D%8F%EF%BC%8C%E9%80%9A%E8%BF%87ibd%E5%92%8Cfrm%E6%96%87%E4%BB%B6%E6%89%B9%E9%87%8F%E6%81%A2%E5%A4%8D%E6%95%B0%E6%8D%AE%E5%BA%93%E6%95%B0%E6%8D%AE%E3%80%91%20(1)/" title="MySQL 数据损坏，通过ibd和frm文件批量恢复数据库数据"><img class="post_bg" src="/dujie5416/img/mysql.jpg" onerror="this.onerror=null;this.src='/dujie5416/img/404.jpg'" alt="MySQL 数据损坏，通过ibd和frm文件批量恢复数据库数据"></a></div><div class="recent-post-info"><a class="article-title" href="/dujie5416/2023/01/13/%E3%80%90mysql%E6%95%B0%E6%8D%AE%E6%8D%9F%E5%9D%8F%EF%BC%8C%E9%80%9A%E8%BF%87ibd%E5%92%8Cfrm%E6%96%87%E4%BB%B6%E6%89%B9%E9%87%8F%E6%81%A2%E5%A4%8D%E6%95%B0%E6%8D%AE%E5%BA%93%E6%95%B0%E6%8D%AE%E3%80%91%20(1)/" title="MySQL 数据损坏，通过ibd和frm文件批量恢复数据库数据">MySQL 数据损坏，通过ibd和frm文件批量恢复数据库数据</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-01-13T05:32:00.000Z" title="发表于 2023-01-13 13:32:00">2023-01-13</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/dujie5416/categories/mysql/">mysql</a></span></div><div class="content">问题描述客户那边的测试服务器下午3:00左右因不明原因，所有服务访问不了，ssh也无法连接，客户手动进行强制重启服务器，重启后将所有应用、中间件重启，重启nacos时发现无法连接数据库，通过账号密码登录到数据库发现可以正常登录，但是奇怪的问题来了。。。show tables 时可以正常看到表，但是查询表中数据时发现提示表不存在。。如下图：
查看mysql日志：
作为一名mysql菜的不能再菜的小白。。这属实难到我了，看起来像是数据损坏。。没办法，通过多方查询资料，解决办法如下：
解决办法：首先了解InnoDB引擎创建数据库会产生的文件：

.ibd：包含每个表的数据和索引
.frm：描述表的结构
ibdata1：包含所有表的字典和历史操作


在test目录下，包含每个表的.ibd和.frm文件
恢复前提：ibd文件的数据都是正常的之后也是需要通过这些文件进行恢复，我这边新启了一个mysql实例，过程略，大体的恢复步骤如下：

在新的mysql实例中创建数据库，需要跟原数据库的库名和字符集保持一致
创建数据表，表名要求一致，对应原库data目录下的表名（我这里用工具对原库表的表结构导出 ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/dujie5416/2022/08/23/%E5%88%86%E6%9E%90%20ExitCode%20%E5%AE%9A%E4%BD%8D%20Pod%20%E5%BC%82%E5%B8%B8%E9%80%80%E5%87%BA%E5%8E%9F%E5%9B%A0%20/" title="分析ExitCode定位Pod异常退出原因"><img class="post_bg" src="/dujie5416/img/kubernetes.png" onerror="this.onerror=null;this.src='/dujie5416/img/404.jpg'" alt="分析ExitCode定位Pod异常退出原因"></a></div><div class="recent-post-info"><a class="article-title" href="/dujie5416/2022/08/23/%E5%88%86%E6%9E%90%20ExitCode%20%E5%AE%9A%E4%BD%8D%20Pod%20%E5%BC%82%E5%B8%B8%E9%80%80%E5%87%BA%E5%8E%9F%E5%9B%A0%20/" title="分析ExitCode定位Pod异常退出原因">分析ExitCode定位Pod异常退出原因</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2022-08-23T06:32:00.000Z" title="发表于 2022-08-23 14:32:00">2022-08-23</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/dujie5416/categories/kubernetes/">kubernetes</a></span></div><div class="content">使用kubectl describe pod &lt;pod name&gt;查看异常  pod 的状态:
Containers :
  kubedns :  
      Container ID :
docker :&#x2F;&#x2F;5fb8adf9ee62afc6d3f6f3d9590041818750b392dff015d7091eaaf99cf1c945
      Image: ccr.ccs.tencentyun.com&#x2F;library&#x2F;kubedns-amd64:1.14.4
      Image ID: docker-pullable:&#x2F;&#x2F;ccr.ccs.tencentyun.com&#x2F;library&#x2F;kubedns- amd64@sha256:40790881bbe9ef4ae4ff7fe8b892498eecb7fe6dcc22661402f271e03f7de344
      Ports: 10053&#x2F;UDP, 10053&#x2F;TCP, 10055&#x2F;TCP
       ...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/dujie5416/2022/08/23/%E5%AE%B9%E5%99%A8%E8%BF%9B%E7%A8%8B%E4%B8%BB%E5%8A%A8%E9%80%80%E5%87%BA%E5%8E%9F%E5%9B%A0/" title="容器进程退出原因"><img class="post_bg" src="/dujie5416/img/kubernetes.png" onerror="this.onerror=null;this.src='/dujie5416/img/404.jpg'" alt="容器进程退出原因"></a></div><div class="recent-post-info"><a class="article-title" href="/dujie5416/2022/08/23/%E5%AE%B9%E5%99%A8%E8%BF%9B%E7%A8%8B%E4%B8%BB%E5%8A%A8%E9%80%80%E5%87%BA%E5%8E%9F%E5%9B%A0/" title="容器进程退出原因">容器进程退出原因</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2022-08-23T06:32:00.000Z" title="发表于 2022-08-23 14:32:00">2022-08-23</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/dujie5416/categories/kubernetes/">kubernetes</a></span></div><div class="content">容器进程如果是自己主动退出(不是被外界中断杀死)，  退出状态码一般在  0-128 之间，  根据约定，  正 常退出时状态码为  0，  1-127 说明是程序发生异常，  主动退出了，   比如检测到启动的参数和条件不满  足要求，  或者运行过程中发生  panic 但没有捕获处理导致程序退出。   除了可能是业务程序  BUG，  还   有其它许多可能原因
DNS 无法解析可能程序依赖  集群  DNS 服务，   比如启动时连接数据库，  数据库使用  service 名称或外部域名都需 要  DNS 解析，  如果解析失败程序将报错并主动退出。   解析失败的可能原因:

集群网络有问题，   Pod 连不上集群  DNS 服务
集群  DNS 服务挂了，  无法响应解析请求
Service 或域名地址配置有误，  本身是无法解析的地址

程序配置有误
配置文件格式错误，  程序启动解析配置失败报错退出
配置内容不符合规范，   比如配置中某个字段是必选但没有填写，  配置校验不通过，  程序报错主动退出

</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/dujie5416/2022/08/19/kubernetes%E7%A3%81%E7%9B%98%E7%88%86%E6%BB%A1%E6%95%85%E9%9A%9C%E5%A4%84%E7%90%86/" title="kubernetes 磁盘爆满故障处理"><img class="post_bg" src="/dujie5416/img/kubernetes.png" onerror="this.onerror=null;this.src='/dujie5416/img/404.jpg'" alt="kubernetes 磁盘爆满故障处理"></a></div><div class="recent-post-info"><a class="article-title" href="/dujie5416/2022/08/19/kubernetes%E7%A3%81%E7%9B%98%E7%88%86%E6%BB%A1%E6%95%85%E9%9A%9C%E5%A4%84%E7%90%86/" title="kubernetes 磁盘爆满故障处理">kubernetes 磁盘爆满故障处理</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2022-08-19T06:32:00.000Z" title="发表于 2022-08-19 14:32:00">2022-08-19</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/dujie5416/categories/kubernetes/">kubernetes</a></span></div><div class="content">一、什么情况下磁盘可能会爆满 ？kubelet 有 gc 和驱逐机制，通过 --image-gc-high-threshold，--image-gc-low- threshold，--eviction-hard，--eviction-soft，--eviction-minimum-reclaim 等参数控制 kubelet 的 gc 和驱逐策略来释放磁盘空间，如果配置正确的情况下，磁盘一般不会爆满。

通常导致爆满的原因可能是配置不正确或者节点上有其它非 K8S 管理的进程在不断写数据到磁盘占用 大量空间导致磁盘爆满。

二、磁盘爆满会有什么影响 ？影响 K8S 运行我们主要关注 kubelet 和容器运行时这两个最关键的组件，它们所使用的目录通常不 一样，kubelet 一般不会单独挂盘，直接使用系统磁盘，因为通常占用空间不会很大，容器运行时单 独挂盘的场景比较多，当磁盘爆满的时候我们也要看 kubelet 和 容器运行时使用的目录是否在这个 磁盘，通过 df 命令可以查看磁盘挂载点。


容器运行时使用的目录所在磁盘爆满



如果容器运行时使用的目录所在磁盘空间爆满，可能会造成容 ...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/dujie5416/2022/08/16/Jenkins%E7%94%A8%E6%88%B7%E6%9D%83%E9%99%90%E6%8E%A7%E5%88%B6%E6%8F%92%E4%BB%B6%E2%80%94%E2%80%94Role-based%20Authorization%20Strategy/" title="Jenkins用户权限控制插件——Role-based Authorization Strategy"><img class="post_bg" src="/dujie5416/img/jenkins.png" onerror="this.onerror=null;this.src='/dujie5416/img/404.jpg'" alt="Jenkins用户权限控制插件——Role-based Authorization Strategy"></a></div><div class="recent-post-info"><a class="article-title" href="/dujie5416/2022/08/16/Jenkins%E7%94%A8%E6%88%B7%E6%9D%83%E9%99%90%E6%8E%A7%E5%88%B6%E6%8F%92%E4%BB%B6%E2%80%94%E2%80%94Role-based%20Authorization%20Strategy/" title="Jenkins用户权限控制插件——Role-based Authorization Strategy">Jenkins用户权限控制插件——Role-based Authorization Strategy</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2022-08-16T02:02:00.000Z" title="发表于 2022-08-16 10:02:00">2022-08-16</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/dujie5416/categories/jenkins/">jenkins</a></span></div><div class="content">
看了下公司的jenkins权限配置，发现公司用的是Role-based AuthorizationStrategy插件做的权限控制（之前公司一直用的是安全矩阵的方式控制的） 这里就大概记录一下吧

使用Role-based Authorization Strategy这个插件需要在jenkins插件里搜索并下载下载成功后重启jenkins，发现在jenkins管理中会多出一个Manage and Assign Roles，如下图：


点进去可以分别管理角色和给用户分配角色：

我们首先看下Manage Roles：

这里包括几个选项，Global roles ：这个选项是添加一个角色，该角色对项目可以有哪些权限，一般会给开放分配build，cancel等权限，每个公司不太一样Project roles：这个选项就是添加一个可以对哪些job进行操作的角色权限，Role是角色名，会在Assign Roles里展示的，Pattern是匹配项目，比如你的项目名是dys-web-prod，那么这里就要写dys-web-.*进行匹配（我个人测试的结果是这样的）Slave roles：这个公司 ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/dujie5416/2022/08/15/Pod%E5%BC%82%E5%B8%B8%E7%8A%B6%E6%80%81%E6%8E%92%E9%94%99/" title="Pod异常状态排错"><img class="post_bg" src="/dujie5416/img/kubernetes.png" onerror="this.onerror=null;this.src='/dujie5416/img/404.jpg'" alt="Pod异常状态排错"></a></div><div class="recent-post-info"><a class="article-title" href="/dujie5416/2022/08/15/Pod%E5%BC%82%E5%B8%B8%E7%8A%B6%E6%80%81%E6%8E%92%E9%94%99/" title="Pod异常状态排错">Pod异常状态排错</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2022-08-15T06:32:00.000Z" title="发表于 2022-08-15 14:32:00">2022-08-15</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/dujie5416/categories/kubernetes/">kubernetes</a></span></div><div class="content">一、常用命令首先列出Pod排查过程中我这边的常用命令：

查看Pod状态：kubectl get pod  podname -o wide
查看Pod的yaml配置：kubectl get pods podname -o yaml
查看pod事件：kubectl describe pods podname 
查看容器日志：kubectl logs podsname -c  container-name

二、Pod状态
Error：Pod 启动过程中发生错误
NodeLost : Pod 所在节点失联
Unkown : Pod 所在节点失联或其它未知异常
Waiting : Pod 等待启动
Pending : Pod 等待被调度
ContainerCreating : Pod 容器正在被创建
Terminating : Pod 正在被销毁
CrashLoopBackOff ： 容器退出，kubelet 正在将它重启
InvalidImageName ： 无法解析镜像名称
ImageInspectError ： 无法校验镜像
ErrImageNeverPull ： 策略禁止拉取镜像
I ...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/dujie5416/2022/08/13/%E9%98%B2%E6%AD%A2%E5%86%85%E5%AD%98%E7%A2%8E%E7%89%87%E5%8C%96/" title="防止内存碎片化"><img class="post_bg" src="/dujie5416/img/kubernetes.png" onerror="this.onerror=null;this.src='/dujie5416/img/404.jpg'" alt="防止内存碎片化"></a></div><div class="recent-post-info"><a class="article-title" href="/dujie5416/2022/08/13/%E9%98%B2%E6%AD%A2%E5%86%85%E5%AD%98%E7%A2%8E%E7%89%87%E5%8C%96/" title="防止内存碎片化">防止内存碎片化</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2022-08-13T06:32:00.000Z" title="发表于 2022-08-13 14:32:00">2022-08-13</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/dujie5416/categories/kubernetes/">kubernetes</a></span></div><div class="content">在长时间运行的Linux操作系统中，系统日志有时会出现无法分配高阶内存的报错信息：
Aug  4 22:58:15 server1 kernel: : [69229257.683658] xenwatch: page allocation failure. order:4, mode:0xd0
Aug  4 22:58:15 server1 kernel: : [69229257.683665] Pid: 168, comm: xenwatch Tainted: GF          ---------------    2.6.32-358.23.2.el5.x86_64 #1
Aug  4 22:58:15 server1 kernel: : [69229257.683672] Call Trace:
Aug  4 22:58:15 server1 kernel: : [69229257.683688]  [&lt;ffffffff8112723a&gt;] ? __alloc_pages_nodemask+0x67a&#x2F;0x8c0
Aug  4 22:58:15 ser ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/dujie5416/2022/08/04/%E5%9F%BA%E4%BA%8Ecentos7%E7%9A%84Openssh%E7%89%88%E6%9C%AC%E5%8D%87%E7%BA%A7/" title="基于centos7的Openssh版本升级"><img class="post_bg" src="/dujie5416/img/centos.png" onerror="this.onerror=null;this.src='/dujie5416/img/404.jpg'" alt="基于centos7的Openssh版本升级"></a></div><div class="recent-post-info"><a class="article-title" href="/dujie5416/2022/08/04/%E5%9F%BA%E4%BA%8Ecentos7%E7%9A%84Openssh%E7%89%88%E6%9C%AC%E5%8D%87%E7%BA%A7/" title="基于centos7的Openssh版本升级">基于centos7的Openssh版本升级</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2022-08-04T07:51:23.000Z" title="发表于 2022-08-04 15:51:23">2022-08-04</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/dujie5416/categories/linux/">linux</a></span></div><div class="content">
一、环境准备
yum -y install wget tar gcc make
二、上传升级的软件包
 zlib-1.2.11.tar.gz，openssl-1.1.1d .tar.gz，openssh-9.0p1.tar.gz 下载地址：

zlib：官网http://www.zlib.net/ wget https://nchc.dl.sourceforge.net/project/libpng/zlib/1.2.11/zlib-1.2.11.tar.gzopenssl：wget https://www.openssl.org/source/openssl-1.1.1d.tar.gzopenssh：https://mirrors.sonic.net/pub/OpenBSD/OpenSSH/portable/

上传到服务器并解压三、安装libz
cd zlib-1.2.11
./configure --prefix=/usr/local/zlib
make &amp;&amp; make install
四、安装openssl
cd openssl-1.1.1d
./config ...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/dujie5416/2022/08/02/%E4%BD%BF%E7%94%A8%E9%98%BF%E9%87%8C%E4%BA%91oss%E9%9D%99%E6%80%81%E9%A1%B5%E9%9D%A2%E9%83%A8%E7%BD%B2%E6%9C%8D%E5%8A%A1/" title="使用阿里云oss静态页面部署服务"><img class="post_bg" src="/dujie5416/img/12.png" onerror="this.onerror=null;this.src='/dujie5416/img/404.jpg'" alt="使用阿里云oss静态页面部署服务"></a></div><div class="recent-post-info"><a class="article-title" href="/dujie5416/2022/08/02/%E4%BD%BF%E7%94%A8%E9%98%BF%E9%87%8C%E4%BA%91oss%E9%9D%99%E6%80%81%E9%A1%B5%E9%9D%A2%E9%83%A8%E7%BD%B2%E6%9C%8D%E5%8A%A1/" title="使用阿里云oss静态页面部署服务">使用阿里云oss静态页面部署服务</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2022-08-02T08:47:50.000Z" title="发表于 2022-08-02 16:47:50">2022-08-02</time></span></div><div class="content">一、使用阿里云OSS静态页面部署公司服务场景：因公司新业务需要将项目部署在阿里云oss上，并配置域名解析

创建bucket桶注意：读写权限选择公共读

将bucket上传到bucket中

配置静态页面


如果不配置静态页面会无法访问，注意要添加默认404规则，如果不添加则会报下面的错误：
 添加域名解析
查看oss外网访问域名,在域名解析界面将二级域名指向oss的外网域名，如果公司有内网dns则需要在内网dns中也添加相关记录

</div></div></div><nav id="pagination"><div class="pagination"><a class="extend prev" rel="prev" href="/dujie5416/page/3/#content-inner"><i class="fas fa-chevron-left fa-fw"></i></a><a class="page-number" href="/dujie5416/">1</a><span class="space">&hellip;</span><a class="page-number" href="/dujie5416/page/3/#content-inner">3</a><span class="page-number current">4</span><a class="page-number" href="/dujie5416/page/5/#content-inner">5</a><span class="space">&hellip;</span><a class="page-number" href="/dujie5416/page/8/#content-inner">8</a><a class="extend next" rel="next" href="/dujie5416/page/5/#content-inner"><i class="fas fa-chevron-right fa-fw"></i></a></div></nav></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="is-center"><div class="avatar-img"><img src="/dujie5416/img/touxiang.png" onerror="this.onerror=null;this.src='/dujie5416/img/friend_404.gif'" alt="avatar"/></div><div class="author-info__name">J.</div><div class="author-info__description"></div></div><div class="card-info-data site-data is-center"><a href="/dujie5416/archives/"><div class="headline">文章</div><div class="length-num">73</div></a><a href="/dujie5416/tags/"><div class="headline">标签</div><div class="length-num">17</div></a><a href="/dujie5416/categories/"><div class="headline">分类</div><div class="length-num">11</div></a></div></div><div class="sticky_layout"><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/dujie5416/2023/07/29/%E6%A0%B9%E6%8D%AErouter%E6%98%BE%E7%A4%BA%E5%B7%A6%E4%BE%A7%E8%8F%9C%E5%8D%95%E6%A0%8F%E9%9A%90%E8%97%8F%E6%9F%90%E4%B8%AA%E8%8F%9C%E5%8D%95%E9%80%89%E9%A1%B9/" title="vue3左侧菜单隐藏某选项"><img src="/dujie5416/img/golang.png" onerror="this.onerror=null;this.src='/dujie5416/img/404.jpg'" alt="vue3左侧菜单隐藏某选项"/></a><div class="content"><a class="title" href="/dujie5416/2023/07/29/%E6%A0%B9%E6%8D%AErouter%E6%98%BE%E7%A4%BA%E5%B7%A6%E4%BE%A7%E8%8F%9C%E5%8D%95%E6%A0%8F%E9%9A%90%E8%97%8F%E6%9F%90%E4%B8%AA%E8%8F%9C%E5%8D%95%E9%80%89%E9%A1%B9/" title="vue3左侧菜单隐藏某选项">vue3左侧菜单隐藏某选项</a><time datetime="2023-07-29T06:32:00.000Z" title="发表于 2023-07-29 14:32:00">2023-07-29</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/dujie5416/2023/07/13/Vue%E7%8A%B6%E6%80%81%E7%AE%A1%E7%90%86/" title="Vue状态管理"><img src="/dujie5416/img/golang.png" onerror="this.onerror=null;this.src='/dujie5416/img/404.jpg'" alt="Vue状态管理"/></a><div class="content"><a class="title" href="/dujie5416/2023/07/13/Vue%E7%8A%B6%E6%80%81%E7%AE%A1%E7%90%86/" title="Vue状态管理">Vue状态管理</a><time datetime="2023-07-13T09:29:00.000Z" title="发表于 2023-07-13 17:29:00">2023-07-13</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/dujie5416/2023/06/27/%E5%9F%BA%E4%BA%8EIOC%E8%A7%A3%E5%86%B3%E5%AF%B9%E8%B1%A1%E4%BE%9D%E8%B5%96%E9%97%AE%E9%A2%98/" title="基于IOC解决对象依赖问题"><img src="/dujie5416/img/golang.png" onerror="this.onerror=null;this.src='/dujie5416/img/404.jpg'" alt="基于IOC解决对象依赖问题"/></a><div class="content"><a class="title" href="/dujie5416/2023/06/27/%E5%9F%BA%E4%BA%8EIOC%E8%A7%A3%E5%86%B3%E5%AF%B9%E8%B1%A1%E4%BE%9D%E8%B5%96%E9%97%AE%E9%A2%98/" title="基于IOC解决对象依赖问题">基于IOC解决对象依赖问题</a><time datetime="2023-06-27T03:32:00.000Z" title="发表于 2023-06-27 11:32:00">2023-06-27</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/dujie5416/2023/06/23/Gin%E6%A1%86%E6%9E%B6/" title="Gin框架"><img src="/dujie5416/img/golang.png" onerror="this.onerror=null;this.src='/dujie5416/img/404.jpg'" alt="Gin框架"/></a><div class="content"><a class="title" href="/dujie5416/2023/06/23/Gin%E6%A1%86%E6%9E%B6/" title="Gin框架">Gin框架</a><time datetime="2023-06-23T06:32:00.000Z" title="发表于 2023-06-23 14:32:00">2023-06-23</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/dujie5416/2023/06/04/ServeMux%E3%80%81httprouter/" title="ServeMux、httprouter"><img src="/dujie5416/img/golang.png" onerror="this.onerror=null;this.src='/dujie5416/img/404.jpg'" alt="ServeMux、httprouter"/></a><div class="content"><a class="title" href="/dujie5416/2023/06/04/ServeMux%E3%80%81httprouter/" title="ServeMux、httprouter">ServeMux、httprouter</a><time datetime="2023-06-04T03:32:00.000Z" title="发表于 2023-06-04 11:32:00">2023-06-04</time></div></div></div></div><div class="card-widget card-categories"><div class="item-headline">
            <i class="fas fa-folder-open"></i>
            <span>分类</span>
            <a class="card-more-btn" href="/dujie5416/categories/" title="查看更多">
    <i class="fas fa-angle-right"></i></a>
            </div>
            <ul class="card-category-list" id="aside-cat-list">
            <li class="card-category-list-item "><a class="card-category-list-link" href="/dujie5416/categories/Django/"><span class="card-category-list-name">Django</span><span class="card-category-list-count">1</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/dujie5416/categories/Docker/"><span class="card-category-list-name">Docker</span><span class="card-category-list-count">1</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/dujie5416/categories/SonarQube/"><span class="card-category-list-name">SonarQube</span><span class="card-category-list-count">1</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/dujie5416/categories/golang/"><span class="card-category-list-name">golang</span><span class="card-category-list-count">30</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/dujie5416/categories/iptables/"><span class="card-category-list-name">iptables</span><span class="card-category-list-count">1</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/dujie5416/categories/jenkins/"><span class="card-category-list-name">jenkins</span><span class="card-category-list-count">2</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/dujie5416/categories/kubernetes/"><span class="card-category-list-name">kubernetes</span><span class="card-category-list-count">18</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/dujie5416/categories/linux/"><span class="card-category-list-name">linux</span><span class="card-category-list-count">7</span></a></li>
            </ul></div><div class="card-widget card-tags"><div class="item-headline"><i class="fas fa-tags"></i><span>标签</span></div><div class="card-tag-cloud"><a href="/dujie5416/tags/Django/" style="font-size: 1.1em; color: #999">Django</a> <a href="/dujie5416/tags/Python/" style="font-size: 1.1em; color: #999">Python</a> <a href="/dujie5416/tags/SonarQube/" style="font-size: 1.1em; color: #999">SonarQube</a> <a href="/dujie5416/tags/centos/" style="font-size: 1.23em; color: #999ea6">centos</a> <a href="/dujie5416/tags/docker/" style="font-size: 1.1em; color: #999">docker</a> <a href="/dujie5416/tags/golang/" style="font-size: 1.43em; color: #99a6b9">golang</a> <a href="/dujie5416/tags/grafana/" style="font-size: 1.1em; color: #999">grafana</a> <a href="/dujie5416/tags/iptables/" style="font-size: 1.1em; color: #999">iptables</a> <a href="/dujie5416/tags/jenkins/" style="font-size: 1.17em; color: #999c9f">jenkins</a> <a href="/dujie5416/tags/kubernetes/" style="font-size: 1.37em; color: #99a4b2">kubernetes</a> <a href="/dujie5416/tags/linux/" style="font-size: 1.23em; color: #999ea6">linux</a> <a href="/dujie5416/tags/mysql/" style="font-size: 1.3em; color: #99a1ac">mysql</a> <a href="/dujie5416/tags/prometheus/" style="font-size: 1.1em; color: #999">prometheus</a> <a href="/dujie5416/tags/python/" style="font-size: 1.1em; color: #999">python</a> <a href="/dujie5416/tags/svn/" style="font-size: 1.1em; color: #999">svn</a> <a href="/dujie5416/tags/%E4%BA%91%E5%8E%9F%E7%94%9F/" style="font-size: 1.5em; color: #99a9bf">云原生</a> <a href="/dujie5416/tags/%E9%98%BF%E9%87%8C%E4%BA%91/" style="font-size: 1.1em; color: #999">阿里云</a></div></div><div class="card-widget card-archives"><div class="item-headline"><i class="fas fa-archive"></i><span>归档</span><a class="card-more-btn" href="/dujie5416/archives/" title="查看更多">
    <i class="fas fa-angle-right"></i></a></div><ul class="card-archive-list"><li class="card-archive-list-item"><a class="card-archive-list-link" href="/dujie5416/archives/2023/07/"><span class="card-archive-list-date">七月 2023</span><span class="card-archive-list-count">2</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/dujie5416/archives/2023/06/"><span class="card-archive-list-date">六月 2023</span><span class="card-archive-list-count">4</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/dujie5416/archives/2023/05/"><span class="card-archive-list-date">五月 2023</span><span class="card-archive-list-count">9</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/dujie5416/archives/2023/04/"><span class="card-archive-list-date">四月 2023</span><span class="card-archive-list-count">12</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/dujie5416/archives/2023/02/"><span class="card-archive-list-date">二月 2023</span><span class="card-archive-list-count">4</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/dujie5416/archives/2023/01/"><span class="card-archive-list-date">一月 2023</span><span class="card-archive-list-count">1</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/dujie5416/archives/2022/08/"><span class="card-archive-list-date">八月 2022</span><span class="card-archive-list-count">8</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/dujie5416/archives/2022/07/"><span class="card-archive-list-date">七月 2022</span><span class="card-archive-list-count">9</span></a></li></ul></div><div class="card-widget card-webinfo"><div class="item-headline"><i class="fas fa-chart-line"></i><span>网站资讯</span></div><div class="webinfo"><div class="webinfo-item"><div class="item-name">文章数目 :</div><div class="item-count">73</div></div><div class="webinfo-item"><div class="item-name">已运行时间 :</div><div class="item-count" id="runtimeshow" data-publishDate="2019-09-04T16:00:00.000Z"><i class="fa-solid fa-spinner fa-spin"></i></div></div><div class="webinfo-item"><div class="item-name">本站访客数 :</div><div class="item-count" id="busuanzi_value_site_uv"><i class="fa-solid fa-spinner fa-spin"></i></div></div><div class="webinfo-item"><div class="item-name">本站总访问量 :</div><div class="item-count" id="busuanzi_value_site_pv"><i class="fa-solid fa-spinner fa-spin"></i></div></div><div class="webinfo-item"><div class="item-name">最后更新时间 :</div><div class="item-count" id="last-push-date" data-lastPushDate="2024-01-30T03:12:39.963Z"><i class="fa-solid fa-spinner fa-spin"></i></div></div></div></div></div></div></main><footer id="footer" style="background-image: url('/dujie5416/img/longzhu.png')"><div id="footer-wrap"><div class="copyright">&copy;2019 - 2024  <i id="heartbeat" class="fa fas fa-heartbeat"></i> J.</div><div class="framework-info"><span>框架 </span><a target="_blank" rel="noopener" href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>主题 </span><a target="_blank" rel="noopener" href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a><a href="http://beian.miit.gov.cn/"  style="color:#f72b07" target="_blank">京ICP备2022023567号</a></div></div><link rel="stylesheet" href="https://fastly.jsdelivr.net/gh/HCLonely/images@master/others/heartbeat.min.css"></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="translateLink" type="button" title="简繁转换">繁</button><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button id="go-up" type="button" title="回到顶部"><i class="fas fa-arrow-up"></i></button></div></div><div id="algolia-search"><div class="search-dialog"><nav class="search-nav"><span class="search-dialog-title">搜索</span><button class="search-close-button"><i class="fas fa-times"></i></button></nav><div class="search-wrap"><div id="algolia-search-input"></div><hr/><div id="algolia-search-results"><div id="algolia-hits"></div><div id="algolia-pagination"></div><div id="algolia-info"><div class="algolia-stats"></div><div class="algolia-poweredBy"></div></div></div></div></div><div id="search-mask"></div></div><div id="rightMenu"><div class="rightMenu-group rightMenu-small"><div class="rightMenu-item" id="menu-backward"><i class="fa-solid fa-arrow-left"></i></div><div class="rightMenu-item" id="menu-forward"><i class="fa-solid fa-arrow-right"></i></div><div class="rightMenu-item" id="menu-refresh"><i class="fa-solid fa-arrow-rotate-right"></i></div><div class="rightMenu-item" id="menu-home"><i class="fa-solid fa-house"></i></div></div><div class="rightMenu-group rightMenu-line rightMenuOther"><a class="rightMenu-item menu-link" href="/archives/"><i class="fa-solid fa-archive"></i><span>文章归档</span></a><a class="rightMenu-item menu-link" href="/categories/"><i class="fa-solid fa-folder-open"></i><span>文章分类</span></a><a class="rightMenu-item menu-link" href="/tags/"><i class="fa-solid fa-tags"></i><span>文章标签</span></a></div><div class="rightMenu-group rightMenu-line rightMenuNormal"><a class="rightMenu-item menu-link" id="menu-radompage" href="/random/index.html"><i class="fa-solid fa-shoe-prints"></i><span>随便逛逛</span></a><div class="rightMenu-item" id="menu-translate"><i class="fa-solid fa-earth-asia"></i><span>繁简切换</span></div><div class="rightMenu-item" id="menu-darkmode"><i class="fa-solid fa-moon"></i><span>切换模式</span></div></div></div><div id="rightmenu-mask"></div><div><script src="/dujie5416/js/utils.js"></script><script src="/dujie5416/js/main.js"></script><script src="/dujie5416/js/tw_cn.js"></script><script src="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox.umd.min.js"></script><script src="https://cdn.jsdelivr.net/npm/algoliasearch/dist/algoliasearch-lite.umd.min.js"></script><script src="https://cdn.jsdelivr.net/npm/instantsearch.js/dist/instantsearch.production.min.js"></script><script src="/dujie5416/js/search/algolia.js"></script><script>var preloader = {
  endLoading: () => {
    document.body.style.overflow = 'auto';
    document.getElementById('loading-box').classList.add("loaded")
  },
  initLoading: () => {
    document.body.style.overflow = '';
    document.getElementById('loading-box').classList.remove("loaded")

  }
}
window.addEventListener('load',preloader.endLoading())</script><div class="js-pjax"><script>function subtitleType () {
  getScript('https://yijuzhan.com/api/word.php?m=js').then(() => {
    const con = str[0]
    if (true) {
      const from = '出自 ' + str[1]
      const sub = []
      sub.unshift(con, from)
      window.typed = new Typed('#subtitle', {
        strings: sub,
        startDelay: 300,
        typeSpeed: 150,
        loop: true,
        backSpeed: 50,
      })
    } else {
      document.getElementById('subtitle').innerHTML = con
    }
  })
}

if (true) {
  if (typeof Typed === 'function') {
    subtitleType()
  } else {
    getScript('https://cdn.jsdelivr.net/npm/typed.js/lib/typed.min.js').then(subtitleType)
  }
} else {
  subtitleType()
}
</script></div><script defer src="https://npm.elemecdn.com/jquery@latest/dist/jquery.min.js"></script><script data-pjax defer src="https://npm.elemecdn.com/tzy-blog/lib/js/theme/chocolate.js"></script><canvas id="universe"></canvas><script defer src="/js/universe.js"></script><script defer data-pjax src="/js/rightMenu.js"></script><div class="aplayer no-destroy" data-id="7427714271" data-server="netease" data-type="playlist" data-fixed="true" data-mini="true" data-listFolded="false" data-order="random" data-lrctype="1" data-preload="none" data-autoplay="true" muted></div><script id="click-show-text" src="https://cdn.jsdelivr.net/npm/butterfly-extsrc/dist/click-show-text.min.js" data-mobile="false" data-text="I,LOVE,YOU" data-fontsize="15px" data-random="false" async="async"></script><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/aplayer/dist/APlayer.min.css" media="print" onload="this.media='all'"><script src="https://cdn.jsdelivr.net/npm/aplayer/dist/APlayer.min.js"></script><script src="https://cdn.jsdelivr.net/npm/butterfly-extsrc/metingjs/dist/Meting.min.js"></script><script src="https://cdn.jsdelivr.net/npm/pjax/pjax.min.js"></script><script>let pjaxSelectors = ["meta[property=\"og:image\"]","meta[property=\"og:title\"]","meta[property=\"og:url\"]","head > title","#config-diff","#body-wrap","#rightside-config-hide","#rightside-config-show",".js-pjax"]

var pjax = new Pjax({
  elements: 'a:not([target="_blank"])',
  selectors: pjaxSelectors,
  cacheBust: false,
  analytics: false,
  scrollRestoration: false
})

document.addEventListener('pjax:send', function () {

  // removeEventListener scroll 
  window.tocScrollFn && window.removeEventListener('scroll', window.tocScrollFn)
  window.scrollCollect && window.removeEventListener('scroll', scrollCollect)

  typeof preloader === 'object' && preloader.initLoading()
  document.getElementById('rightside').style.cssText = "opacity: ''; transform: ''"
  
  if (window.aplayers) {
    for (let i = 0; i < window.aplayers.length; i++) {
      if (!window.aplayers[i].options.fixed) {
        window.aplayers[i].destroy()
      }
    }
  }

  typeof typed === 'object' && typed.destroy()

  //reset readmode
  const $bodyClassList = document.body.classList
  $bodyClassList.contains('read-mode') && $bodyClassList.remove('read-mode')

  typeof disqusjs === 'object' && disqusjs.destroy()
})

document.addEventListener('pjax:complete', function () {
  window.refreshFn()

  document.querySelectorAll('script[data-pjax]').forEach(item => {
    const newScript = document.createElement('script')
    const content = item.text || item.textContent || item.innerHTML || ""
    Array.from(item.attributes).forEach(attr => newScript.setAttribute(attr.name, attr.value))
    newScript.appendChild(document.createTextNode(content))
    item.parentNode.replaceChild(newScript, item)
  })

  GLOBAL_CONFIG.islazyload && window.lazyLoadInstance.update()

  typeof chatBtnFn === 'function' && chatBtnFn()
  typeof panguInit === 'function' && panguInit()

  // google analytics
  typeof gtag === 'function' && gtag('config', '', {'page_path': window.location.pathname});

  // baidu analytics
  typeof _hmt === 'object' && _hmt.push(['_trackPageview',window.location.pathname]);

  typeof loadMeting === 'function' && document.getElementsByClassName('aplayer').length && loadMeting()

  // prismjs
  typeof Prism === 'object' && Prism.highlightAll()

  typeof preloader === 'object' && preloader.endLoading()
})

document.addEventListener('pjax:error', (e) => {
  if (e.request.status === 404) {
    pjax.loadUrl('/404.html')
  }
})</script><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script></div><!-- hexo injector body_end start --><script data-pjax>
  function butterfly_clock_anzhiyu_injector_config(){
    var parent_div_git = document.getElementsByClassName('sticky_layout')[0];
    var item_html = '<div class="card-widget card-clock"><div class="card-glass"><div class="card-background"><div class="card-content"><div id="hexo_electric_clock"><img class="entered loading" id="card-clock-loading" src="https://cdn.cbd.int/hexo-butterfly-clock-anzhiyu/lib/loading.gif" style="height: 120px; width: 100%;" data-ll-status="loading"/></div></div></div></div></div>';
    console.log('已挂载butterfly_clock_anzhiyu')
    if(parent_div_git) {
      parent_div_git.insertAdjacentHTML("afterbegin",item_html)
    }
  }
  var elist = 'null'.split(',');
  var cpage = location.pathname;
  var epage = 'all';
  var qweather_key = '56289903f0d448dfbe8262dba0175f70';
  var gaud_map_key = '01603f2b2d08d0e947bb101e9d9b148b';
  var baidu_ak_key = 'undefined';
  var flag = 0;
  var clock_rectangle = '112.982279,28.19409';
  var clock_default_rectangle_enable = 'false';

  for (var i=0;i<elist.length;i++){
    if (cpage.includes(elist[i])){
      flag++;
    }
  }

  if ((epage ==='all')&&(flag == 0)){
    butterfly_clock_anzhiyu_injector_config();
  }
  else if (epage === cpage){
    butterfly_clock_anzhiyu_injector_config();
  }
  </script><script src="https://widget.qweather.net/simple/static/js/he-simple-common.js?v=2.0"></script><script data-pjax src="https://cdn.cbd.int/hexo-butterfly-clock-anzhiyu/lib/clock.min.js"></script><!-- hexo injector body_end end --><script src="/dujie5416/live2dw/lib/L2Dwidget.min.js?094cbace49a39548bed64abff5988b05"></script><script>L2Dwidget.init({"tagMode":false,"debug":false,"model":{"jsonPath":"/dujie5416/live2dw/assets/tororo.model.json"},"display":{"position":"right","width":150,"height":350,"hOffset":20,"vOffset":-20},"mobile":{"show":false},"log":false,"pluginJsPath":"lib/","pluginModelPath":"assets/","pluginRootPath":"live2dw/"});</script><script async>window.onload=function(){var a=document.createElement('script'),b=document.getElementsByTagName('script')[0];a.type='text/javascript',a.async=!0,a.src='/sw-register.js?v='+Date.now(),b.parentNode.insertBefore(a,b)};</script></body></html>